package com.dapeng.www.myapplication;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

import com.dapeng.www.myapplication.db.DaoMaster;
import com.dapeng.www.myapplication.db.TestData2Dao;
import com.dapeng.www.myapplication.db.TestData3Dao;
import com.dapeng.www.myapplication.db.TestDataDao;

/**
 * Created by Growth on 2016/3/3.
 */
public class MySQLiteOpenHelper extends DaoMaster.OpenHelper {
    public MySQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

        Log.i("zz","oldVersion==="+oldVersion+"newVersion==="+newVersion);

        MigrationHelper.migrate(db,TestDataDao.class,TestData2Dao.class,TestData3Dao.class);
    }
}
